/* 首页特有样式 */

/* 布局基础设置 */
.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light);
}

/* 标题样式优化 */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 15px;
    position: relative;
    color: var(--dark);
    font-size: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary);
}

/* 文本样式 */
.text-center {
    text-align: center;
}

.more-link {
    margin-top: 40px;
    text-align: center;
}

/* 轮播图样式 */
.banner {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 864px;
    transition: transform 8s ease;
}

.banner:hover img {
    transform: scale(1.05);
}

/* 产品列表样式 - 解决高度不一致问题 */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 产品图片优化 */
.product-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-item:hover img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px 15px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--dark);
    transition: color 0.3s ease;
}

.product-item:hover .product-info h3 {
    color: var(--primary);
}

/* 价格样式 */
.product-price {
    color: #e74c3c;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 10px 0 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

/* 新闻列表样式 - 解决高度不一致问题 */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.news-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: var(--dark);
    transition: color 0.3s ease;
    line-height: 1.4;
}

.news-item:hover .news-content h3 {
    color: var(--primary);
}

.date {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    display: block;
    color: var(--secondary);
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

.summary {
    margin: 15px 0 0 0;
    color: #555;
    line-height: 1.7;
    flex-grow: 1;
}

/* 空状态样式 */
.no-products, .no-news {
    padding: 60px 20px;
    text-align: center;
    background-color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--secondary);
}

/* 按钮变体样式 */
.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 10px 25px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 响应式优化 */
@media (max-width: 992px) {
    .product-list, .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-list, .news-list {
        grid-template-columns: 1fr;
    }
    
    .banner img {
        max-height: 400px; /* 移动端降低轮播图高度 */
    }
    
    .section-padding {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.7rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .product-item img {
        height: 180px;
    }
    
    .news-content {
        padding: 20px;
    }
    
    .more-link .btn {
        width: 100%;
    }
}
    